import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

const routes = [
	{
		path: '/',
		name: '登录',
		component: () => import('@/components/Login.vue')
	},{
		path: '/index',
		name: '首页',
		component: () => import('@/components/Index.vue'),
		children:[
			{
				path: '/residentShow',
				name: '居民列表',
				component: () => import('@/views/resident/ResidentShow.vue')
			},{
			     path: '/orgnazitionShow',
				name: '组织列表',
				component: () => import('@/views/orgnazition/OrgnazitionShow.vue')
			},{
				path: '/addOrgnazition',
				name: '添加组织',
				component: () => import('@/views/orgnazition/addOrgnazition.vue')
			},{
				path: '/docterShow',
				name: '医生列表',
				component: () => import('@/views/docter/DocterShow.vue')
			},{
				path: '/addDocter',
				name: '添加医生',
				component: () => import('@/views/docter/AddDocter.vue')
			},{
				path:'/docterChat',
				name:'聊天',
				component: () => import('@/views/chat/DocterChatShow.vue')
			},{
				path:'/residentChat',
				name:'居民聊天',
				component: () => import('@/views/chat/ResidentChat.vue')
			}
		]
	}
]



const router = new Router({
	mode: 'history',
	routes
})

export default router;